package com.kzw.oa.system.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * FileAttach[附件信息]
 */
@Entity
@Table(name = "file_attach")
public class FileAttach implements Serializable {
	private static final long serialVersionUID = -8625069812332377278L;

	/**
	 * 删除标识,1=已删除
	 */
	public static final Integer FLAG_DEL = 1;
	/**
	 * 删除标识,0=未删除
	 */
	public static final Integer FLAG_NOT_DEL = 0;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long fileId;

	@Column
	private String fileName;

	@Column
	private String filePath;

	@Column
	private Date createtime;

	@Column(length = 20)
	private String ext;

	@Column(length = 100)
	private String fileType;

	@Column(length = 500)
	private String note;

	@Column(length = 50)
	private String creator;

	@Column
	private Long creatorId;

	@Column
	private Long totalBytes;

	@Column
	private Integer delFlag;

	@ManyToOne
	@JoinColumn(name = "global_type_id")
	private GlobalType globalType;

	public FileAttach() {
	}

	public FileAttach(Long in_fileId) {
		this.setFileId(in_fileId);
	}

	public Long getFileId() {
		return this.fileId;
	}

	public void setFileId(Long aValue) {
		this.fileId = aValue;
	}

	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String aValue) {
		this.fileName = aValue;
	}

	public String getFilePath() {
		return this.filePath;
	}

	public void setFilePath(String aValue) {
		this.filePath = aValue;
	}

	public Date getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Date aValue) {
		this.createtime = aValue;
	}

	public String getExt() {
		return this.ext;
	}

	public void setExt(String aValue) {
		this.ext = aValue;
	}

	public String getFileType() {
		return this.fileType;
	}

	public void setFileType(String aValue) {
		this.fileType = aValue;
	}

	public String getNote() {
		return this.note;
	}

	public void setNote(String aValue) {
		this.note = aValue;
	}

	public String getCreator() {
		return this.creator;
	}

	public void setCreator(String aValue) {
		this.creator = aValue;
	}

	public Long getTotalBytes() {
		return totalBytes;
	}

	public void setTotalBytes(Long totalBytes) {
		this.totalBytes = totalBytes;
	}

	public Integer getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(Integer delFlag) {
		this.delFlag = delFlag;
	}

	public Long getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}

	public GlobalType getGlobalType() {
		return globalType;
	}

	public void setGlobalType(GlobalType globalType) {
		this.globalType = globalType;
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "fileId";
	}

	/**
	 * Return the Id (pk) of the entity, must be Integer
	 */
	public Long getId() {
		return fileId;
	}

}
